<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<form action="#(contextPath)/platform/task/saveTaskWait" method="post">
    <div id="test">

    </div>
    <input type="hidden" name="task" value="#(task)">
    <input type="submit" value="提交">
</form>


<script type="text/javascript" src="#(contextPath)/assets/front/web/script/jquery.js"></script>
<script type="text/javascript">
    $(function(){
        $.ajax({
            type:"post",
            url:"#(contextPath)/platform/fair/list",
            dataType:"json",
            success:function (data) {
                var data=data.data;
                for (var i=0 ; i<data.length;i++){
                    $("#test").append("<input type='checkbox' name ='fairs' value='"+data[i].id+"'>"+data[i].nick_name);
                }
            }
        })


    })


</script>
</body>
</html>